package com.epoint.xmglspringbootstarterconfiguration;

import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(XmglProperties.class)
@EnableConfigurationProperties(XmglProperties.class)
public class XmglAutoConfiguration {

    @Bean
    @ConditionalOnMissingBean(XmglService.class)
    public XmglService xmglService(){
        return new XmglService();
    }

}
